<template>
	<view class="login_page">
		
		
		<!-- <view>梧桐树</view> -->
		<!-- <view class="btn"><button type="primary" @click="getUserInfo">手动授权登录</button></view> -->
	</view>
</template>

<script>
	import app from '@/util/api.js'
	export default{
		data(){
			return{
				appid:'wx5805e809d430c974',
			}
		},
		methods:{
			getUserInfo(res){
					let url = encodeURIComponent('https://xjtuboshu.cn/mobile/#/pages/loginmodel')
								window.location.href =
									`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${this.appid}&redirect_uri=${url}&response_type=code&scope=snsapi_userinfo&#wechat_redirect`
	
			},
		
			
		},
		mounted() {
			
		},
		
		onLoad(e) {
			 var pages = getCurrentPages(); // 当前页面
			 var beforePage =pages[pages.length - 2].route // 前一个页面
			 app.save('routerurl',beforePage.split('pages/')[1])
			this.getUserInfo()
	
		},
		
		
	

	}
</script>

<style scoped>

</style>
